/* 

COCHE.CPP 

	Clase generica para los coches del jugador y enemigos

*/

#include "coche.h"
#include "entity.h"

void CCoche::stepBack(int n){
    position.x -= n * cos(DEG2RAD(direction));
	position.z -= n * sin(DEG2RAD(direction));
}

void CCoche::stepForward(int n){
    position.x += n * cos(DEG2RAD(direction));
	position.z += n * sin(DEG2RAD(direction));
}

void CCoche::OnCollision(CObject*collisionObject){
}

CCoche::CCoche(){
	hitPoints = 100;
	isDead = false;
	velocity = CVector(0.0, 0.0, 0.0);//10.0);
	runSpeed = velocity.z;
    SetState(MODEL_IDLE);
	direction = 0.0f;
	player = NULL;
    size = 6;
}

void CCoche::setId(int n){
    id = n;
}